package com.kevin.model;

import lombok.Data;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.One;
import org.nutz.dao.entity.annotation.Table;


/**
 * 文章附件类
 * 
 * @author gevin(gevinhjy@foxmail.com)
 * 
 */
@Table("ArticleAttachment")
public @Data class ArticleAttachment {

	@Id
	private int id;
	@Column
	private int artinfoid;
	@Column
	private String oldname;
	@Column
	private String newname;
	@Column
	private String size;
	
	@One(target = ArticleInfo.class, field = "artinfoid")
	private ArticleInfo articleInfo;

	public ArticleAttachment() {
		super();
	}
	public ArticleAttachment(String oldname, String newname, String size) {
		super();
		this.oldname = oldname;
		this.newname = newname;
		this.size = size;
	}	

}
